<HTML><HEAD><TITLE>shadow_call(+StoreName, ?Goal)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(shadow_cons)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>shadow_call(+StoreName, ?Goal)</H1>
       Invokes a constraint on (the shadow variables of) a shadow constraint store.
<DL>
<DT><EM>StoreName</EM></DT>
<DD>The name of a shadow constraint store.  This call may be the first reference to this store. It must be an atom.
</DD>
<DT><EM>Goal</EM></DT>
<DD>A goal (i.e. a constraint): its variables need not (yet) have shadows in the named store
</DD>
</DL>
<H2>Description</H2>
A copy of the Goal is made, replacing all the variables by their representatives in the shadow constraint store.  This copied goal is then called
        
<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
The constraint is inconsistent with those previously imposed on the shadow store
<H3>Resatisfiable</H3>
No.
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>StoreName is uninstantiated
<DT><EM>(5) type error </EM>
<DD>StoreName is not an atom
</DL>
<H2>Examples</H2>
<PRE>
    Success:
        [eclipse]: X::1..10, shadow_call(fred,X#&gt;2).
        X = X{fd:[1..10], shadow_cons:[fred - ShadowVar{[3..10]}]}
        yes.
        [eclipse]: shadow_call(fred, X#&gt;2), 
                   shadow_call(fred, Y #&gt; X), 
                   shadow_var(Y, fred, Z).
        X = X{[fred - ShadowVar{[3..9999999]}]}
        Y = Y{[fred - Z{[4..10000000]}]}
        Z = Z{[4..10000000]}
        yes.

    Fail:
        [eclipse]: X::1..10, shadow_call(fred,X#&gt;10).
        no (more) solution.
    Error:
        shadow_call(Var,true).  % Error 4
    </PRE>
<H2>See Also</H2>
<A HREF="../../lib/shadow_cons/shadow_var-3.html">shadow_var / 3</A>
</BODY></HTML>
